function the12PositionAd(options){
    var page=options.page;
    var id=options.id;
    var width=options.width;
    var height=options.height;
    var fix=options.fix;
    var html=options.html;
    var position=options.position;
    var box='<div id="{id}" style="position:absolute;left:0;top:0;z-index:9999;width:{width}px;height:{height}px;display:none;background-color:green;color:white;">{html}</div>'.replace("{id}",id).replace("{width}",width).replace("{height}",height).replace("{html}",html);
    $("body").append(box);
    window.setInterval(setPosition,500);
    function setPosition(){
        var target=$("#"+id);
        var vw=$(window).width();
        var vh=$(window).height();
        var l1=0;
        var l2=(vw-page)/2-width;
        var l3=(vw+page)/2;
        var l4=vw-width;
        var t1=$(window).scrollTop();
        var t2=(vh-height)/2+$(window).scrollTop();
        var t3=vh-height+$(window).scrollTop();
        var the_left=the_top=0;
        switch(position){
            case 1:
                the_left=l1;
                the_top=t1;
                break;
            case 2:
                the_left=l2;
                the_top=t1;
                break;
            case 3:
                the_left=l3;
                the_top=t1;
                break;
            case 4:
                the_left=l4;
                the_top=t1;
                break;
            case 5:
                the_left=l1;
                the_top=t2;
                break;
            case 6:
                the_left=l2;
                the_top=t2;
                break;
            case 7:
                the_left=l3;
                the_top=t2;
                break;
            case 8:
                the_left=l4;
                the_top=t2;
                break;
            case 9:
                the_left=l1;
                the_top=t3;
                break;
            case 10:
                the_left=l2;
                the_top=t3;
                break;
            case 11:
                the_left=l3;
                the_top=t3;
                break;
            case 12:
                the_left=l4;
                the_top=t3;
                break;
            default:
                break;
        }
        the_left=parseInt(the_left);
        the_top=parseInt(the_top);
        target.animate({left:the_left+"px",top:the_top+"px"},"500");
        if(vw>=2*width+page){
            target.fadeIn();
        }
        else{
            target.fadeOut();
        }
    }
}
